import 'package:flutter_screenutil/flutter_screenutil.dart';

///假如设计稿是按iPhone6的尺寸设计的(iPhone6 750*1334)
void setScreenSize(context) {
  ScreenUtil.instance = ScreenUtil(width: 750, height: 1334)..init(context);
}

///自适应宽
double dpWidth(double w) {
  return ScreenUtil.getInstance().setWidth(w);
}

///自适应高
double dpHeight(double h) {
  return ScreenUtil.getInstance().setHeight(h);
}

///自适应文字大小
double spFont(double f) {
  return ScreenUtil.getInstance().setSp(f);
}
